3.1.25 \(\int \frac {1+a x}{\sqrt {a x} \sqrt {1-a x}} \, dx\)

Optimal. Leaf size=37 \[ -\frac {\sqrt {a x} \sqrt {1-a x}}{a}-\frac {3 \sin ^{-1}(1-2 a x)}{2 a} \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {80, 53, 619, 216} \begin {gather*} -\frac {\sqrt {a x} \sqrt {1-a x}}{a}-\frac {3 \sin ^{-1}(1-2 a x)}{2 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + a*x)/(Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

-((Sqrt[a*x]*Sqrt[1 - a*x])/a) - (3*ArcSin[1 - 2*a*x])/(2*a)

Rule 53

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps

\begin {align*} \int \frac {1+a x}{\sqrt {a x} \sqrt {1-a x}} \, dx &=-\frac {\sqrt {a x} \sqrt {1-a x}}{a}+\frac {3}{2} \int \frac {1}{\sqrt {a x} \sqrt {1-a x}} \, dx\\ &=-\frac {\sqrt {a x} \sqrt {1-a x}}{a}+\frac {3}{2} \int \frac {1}{\sqrt {a x-a^2 x^2}} \, dx\\ &=-\frac {\sqrt {a x} \sqrt {1-a x}}{a}-\frac {3 \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a^2}}} \, dx,x,a-2 a^2 x\right )}{2 a^2}\\ &=-\frac {\sqrt {a x} \sqrt {1-a x}}{a}-\frac {3 \sin ^{-1}(1-2 a x)}{2 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 61, normalized size = 1.65 \begin {gather*} \frac {\sqrt {a} x (a x-1)+3 \sqrt {x} \sqrt {1-a x} \sin ^{-1}\left (\sqrt {a} \sqrt {x}\right )}{\sqrt {a} \sqrt {-a x (a x-1)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + a*x)/(Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(Sqrt[a]*x*(-1 + a*x) + 3*Sqrt[x]*Sqrt[1 - a*x]*ArcSin[Sqrt[a]*Sqrt[x]])/(Sqrt[a]*Sqrt[-(a*x*(-1 + a*x))])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.11, size = 51, normalized size = 1.38 \begin {gather*} -\frac {\sqrt {a x} \sqrt {1-a x}}{a}-\frac {6 \tan ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {a x}+1}\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(1 + a*x)/(Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

-((Sqrt[a*x]*Sqrt[1 - a*x])/a) - (6*ArcTan[Sqrt[1 - a*x]/(1 + Sqrt[a*x])])/a

________________________________________________________________________________________

fricas [A]  time = 1.31, size = 43, normalized size = 1.16 \begin {gather*} -\frac {\sqrt {a x} \sqrt {-a x + 1} + 3 \, \arctan \left (\frac {\sqrt {a x} \sqrt {-a x + 1}}{a x}\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="fricas")

[Out]

-(sqrt(a*x)*sqrt(-a*x + 1) + 3*arctan(sqrt(a*x)*sqrt(-a*x + 1)/(a*x)))/a

________________________________________________________________________________________

giac [A]  time = 1.24, size = 28, normalized size = 0.76 \begin {gather*} -\frac {\sqrt {a x} \sqrt {-a x + 1} - 3 \, \arcsin \left (\sqrt {a x}\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="giac")

[Out]

-(sqrt(a*x)*sqrt(-a*x + 1) - 3*arcsin(sqrt(a*x)))/a

________________________________________________________________________________________

maple [C]  time = 0.02, size = 70, normalized size = 1.89 \begin {gather*} -\frac {\sqrt {-a x +1}\, \left (-3 \arctan \left (\frac {\left (2 a x -1\right ) \mathrm {csgn}\relax (a )}{2 \sqrt {-\left (a x -1\right ) a x}}\right )+2 \sqrt {-\left (a x -1\right ) a x}\, \mathrm {csgn}\relax (a )\right ) x \,\mathrm {csgn}\relax (a )}{2 \sqrt {a x}\, \sqrt {-\left (a x -1\right ) a x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x)

[Out]

-1/2*(-a*x+1)^(1/2)*x*(2*(-(a*x-1)*a*x)^(1/2)*csgn(a)-3*arctan(1/2*(2*a*x-1)/(-(a*x-1)*a*x)^(1/2)*csgn(a)))*cs
gn(a)/(a*x)^(1/2)/(-(a*x-1)*a*x)^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 41, normalized size = 1.11 \begin {gather*} -\frac {3 \, \arcsin \left (-\frac {2 \, a^{2} x - a}{a}\right )}{2 \, a} - \frac {\sqrt {-a^{2} x^{2} + a x}}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="maxima")

[Out]

-3/2*arcsin(-(2*a^2*x - a)/a)/a - sqrt(-a^2*x^2 + a*x)/a

________________________________________________________________________________________

mupad [B]  time = 3.45, size = 118, normalized size = 3.19 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {\sqrt {a\,x}}{\sqrt {1-a\,x}-1}\right )}{a}-\frac {4\,\mathrm {atan}\left (\frac {a\,\left (\sqrt {1-a\,x}-1\right )}{\sqrt {a\,x}\,\sqrt {a^2}}\right )}{\sqrt {a^2}}-\frac {\frac {2\,\sqrt {a\,x}}{\sqrt {1-a\,x}-1}-\frac {2\,{\left (a\,x\right )}^{3/2}}{{\left (\sqrt {1-a\,x}-1\right )}^3}}{a\,{\left (\frac {a\,x}{{\left (\sqrt {1-a\,x}-1\right )}^2}+1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x + 1)/((a*x)^(1/2)*(1 - a*x)^(1/2)),x)

[Out]

(2*atan((a*x)^(1/2)/((1 - a*x)^(1/2) - 1)))/a - (4*atan((a*((1 - a*x)^(1/2) - 1))/((a*x)^(1/2)*(a^2)^(1/2))))/
(a^2)^(1/2) - ((2*(a*x)^(1/2))/((1 - a*x)^(1/2) - 1) - (2*(a*x)^(3/2))/((1 - a*x)^(1/2) - 1)^3)/(a*((a*x)/((1
- a*x)^(1/2) - 1)^2 + 1)^2)

________________________________________________________________________________________

sympy [C]  time = 11.71, size = 133, normalized size = 3.59 \begin {gather*} a \left (\begin {cases} - \frac {i \operatorname {acosh}{\left (\sqrt {a} \sqrt {x} \right )}}{a^{2}} - \frac {i \sqrt {x} \sqrt {a x - 1}}{a^{\frac {3}{2}}} & \text {for}\: \left |{a x}\right | > 1 \\\frac {\operatorname {asin}{\left (\sqrt {a} \sqrt {x} \right )}}{a^{2}} + \frac {x^{\frac {3}{2}}}{\sqrt {a} \sqrt {- a x + 1}} - \frac {\sqrt {x}}{a^{\frac {3}{2}} \sqrt {- a x + 1}} & \text {otherwise} \end {cases}\right ) + \begin {cases} - \frac {2 i \operatorname {acosh}{\left (\sqrt {a} \sqrt {x} \right )}}{a} & \text {for}\: \left |{a x}\right | > 1 \\\frac {2 \operatorname {asin}{\left (\sqrt {a} \sqrt {x} \right )}}{a} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/(a*x)**(1/2)/(-a*x+1)**(1/2),x)

[Out]

a*Piecewise((-I*acosh(sqrt(a)*sqrt(x))/a**2 - I*sqrt(x)*sqrt(a*x - 1)/a**(3/2), Abs(a*x) > 1), (asin(sqrt(a)*s
qrt(x))/a**2 + x**(3/2)/(sqrt(a)*sqrt(-a*x + 1)) - sqrt(x)/(a**(3/2)*sqrt(-a*x + 1)), True)) + Piecewise((-2*I
*acosh(sqrt(a)*sqrt(x))/a, Abs(a*x) > 1), (2*asin(sqrt(a)*sqrt(x))/a, True))

________________________________________________________________________________________